<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<div th:fragment="nav">
    <!-- 导航栏-->
    <div style="border:2px slateblue solid">
        <h2 align="center">基于SpringBoot2.7.x MyBatis2.3.x Thymeleaf 的学生成绩简易系统-Mark5</h2>
        <hr>
        <div style="display: flex; justify-content: space-between">
            <h4><a href="/mark5/go2login">学生成绩简易系统-首页</a></h4>
            <div  style="width: 50%; display: flex;  align-content: right;  justify-content: space-between; padding-top: 12px">
                <p th:if="${ session.user== null}" style="color: #aabec5">
                    未登录</p>
                <p  th:if="${ session.user!= null}"style="color: orangered">
                    已登录</p>
                <p style="color: blue" >姓名:
                    <span th:if="${session.user!=null}" th:text="${session.user.uname}"></span></p>
                <p style="color: blueviolet">角色:<span th:if="${session.user!=null}" th:text="${session.user.role}"></span></p>

            </div>
            <p style="color: blue"><a href="/mark5/logout.do">退出</a></p>
            <div th:if="${session.user!= null}" style="width: 5vw; height: 5vw">
                <img style="height: 90%; width: 100% " th:src="'/mark5/showimg/'+ ${session.user.pic}"/>
            </div>
            <p>&nbsp;</p>
        </div>
    </div>
    <!--<hr>-->
</div>

<div th:if="${session.user!=null &&session.user.role=='tea'}">
    <div>
  <h2 style="display: flex; justify-content: space-around">老师--登记成绩</h2>
    <hr>
    <h3 style="display: flex; justify-content: space-around" th:if="${Session}!=null" th:text="${Session}"></h3>
</div>

    <div style="width: 30%; display: flex;" th:if="${info!=null}">
        <h2>消息提示:</h2>
        <h2  style="color: red" align="center"  th:text="${info}"></h2>
    </div>

<div style="display: flex;justify-content: space-around">
  <div>
      <h2 style="display: flex; justify-content: space-around">学生的成绩</h2>
      <table  width="120%" border="1" cellspacing="0" style="line-height: 36px">
          <tr>
              <td align="center">id</td>
              <td align="center">班级编号</td>
              <td align="center">班级名</td>
              <td align="center">学号</td>
              <td align="center"> 学生姓名</td>
              <td align="center"> 课程编号</td>
              <td align="center">课程名字</td>
              <td align="center"> 分数</td>
              <td align="center">操作</td>
              <!--align="center" 水平居中-->
          </tr>

          <tr th:each="x:${scores}">
         <form th:action="'/t_tea/action'" method="post"   >
             <td><input readonly  name="id"        th:value="${x.id}" ></td>
             <td><input readonly  name="user.clz.clzno"     th:value="${x.user.clz.clzno}" ></td>
             <td align="center"th:text="${x.user.clz.clzname}"></td>
             <td><input readonly  name="user.phone"     th:value="${x.user.phone}"></td>
             <td align="center"th:text="${x.user.uname}"></td>
             <td><input readonly  name="course.cno"th:value="${x.course.cno}"> </td>
             <td align="center" th:text="${x.course.cname}"></td>
             <td><input           name="score"     th:value="${x.score}"></td>
             <td><input type="submit" value="保存"></td>
         </form>
          </tr>
      </table>
  </div>

  </div>
</div>
</div>
</body>
</html>